
import java.util.Scanner;
class BAFO {
    public static void main(String[] args) {
        Scanner entrada = new Scanner(System.in);
        int R;
        int n = 0;
        while ((R = entrada.nextInt()) > 0) {
            int A = 0, B = 0;
            while (--R > -1) {
                A += entrada.nextInt();
                B += entrada.nextInt();
            }
            System.out.println("Teste " + ++n);
            System.out.println((A > B) ? "Aldo" : "Beto");
            System.out.println();
        }
    }
}
